package com.krtech.wecard.module.sys.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.krtech.wecard.framework.ext.mybatis.UserDataPower;
import com.krtech.wecard.framework.model.CommRes;
import com.krtech.wecard.framework.model.PageVO;
import com.krtech.wecard.module.pub.entity.ApplicationManagement;
import com.krtech.wecard.module.sys.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.krtech.wecard.module.sys.pojo.SysUserSyncVo;
import com.krtech.wecard.module.sys.pojo.SysUserVo;
import com.krtech.wecard.module.sys.pojo.UserDto;
import org.springframework.web.bind.annotation.RequestBody;

public interface SysUserService extends IService<SysUser> {

    public Page<SysUserVo> pageComplexAll(Page<SysUser> page, UserDto userDto);


    int updateBatch(List<SysUser> list);

    int batchInsert(List<SysUser> list);

    public CommRes saveOrUpdate(SysUserVo param);

    public boolean saveOrUpdateSync( SysUserSyncVo param);

    SysUser getUserAndDeptById(Long userId);

    /**
     * 根据用户id获取其所拥有的数据权限列表
     *
     * @param userId
     * @return
     */
    List<UserDataPower> getUserDataPowers(Long userId);

    public List<Long> getDeptAndSon(Long deptId);

    public List<String> getDeptAndSonByDeptCode(String DeptCode);

    public List<String> getDeptAndSonAsListByDeptCodeList(List<String> DeptCodeList);

    public List<Long> getDeptAndSonExcludeOwn(Long deptId);

    public List<String> getDeptAndSonExcludeOwnByDeptCode(String DeptCode);

    public List<SysUser> getUserByDeptAndSon(Long deptId);

    /**
     * 获得当前用户身份的所有应用
     * @return
     */
    public List<ApplicationManagement> getApplicationListByCurrentUserIdentfify();

}




